package com.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the REPAIRORDER_ database table.
 * 
 */
@Entity
@Table(name="REPAIRORDER_")
@NamedQuery(name="Repairorder.findAll", query="SELECT r FROM Repairorder r")
public class Repairorder implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="REPAIRORDER__REPAIRORDERID_GENERATOR", sequenceName="SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="REPAIRORDER__REPAIRORDERID_GENERATOR")
	@Column(name="REPAIRORDER_ID")
	private long repairorderId;

	@Column(name="REPAIRORDER_ALREADYMONEY")
	private BigDecimal repairorderAlreadymoney;

	@Temporal(TemporalType.DATE)
	@Column(name="REPAIRORDER_ARRANGEDATE")
	private Date repairorderArrangedate;

	@Column(name="REPAIRORDER_CLASSIFY")
	private String repairorderClassify;

	@Column(name="REPAIRORDER_CONTACTS")
	private String repairorderContacts;

	@Column(name="REPAIRORDER_CRUCES")
	private String repairorderCruces;

	@Column(name="REPAIRORDER_FAULTDESCRIPTION")
	private String repairorderFaultdescription;

	@Column(name="REPAIRORDER_GROSSPROFIT")
	private BigDecimal repairorderGrossprofit;

	@Column(name="REPAIRORDER_IFDELETE")
	private BigDecimal repairorderIfdelete;

	@Temporal(TemporalType.DATE)
	@Column(name="REPAIRORDER_INTODATE")
	private Date repairorderIntodate;

	@Column(name="REPAIRORDER_MONEY")
	private BigDecimal repairorderMoney;

	@Column(name="REPAIRORDER_NAME")
	private String repairorderName;

	@Column(name="REPAIRORDER_NUMBER")
	private String repairorderNumber;

	@Column(name="REPAIRORDER_PHONE")
	private String repairorderPhone;

	@Temporal(TemporalType.DATE)
	@Column(name="REPAIRORDER_RECEIVEDATE")
	private Date repairorderReceivedate;

	@Column(name="REPAIRORDER_RECEIVEMAN")
	private String repairorderReceiveman;

	@Column(name="REPAIRORDER_RECEIVESTATE")
	private String repairorderReceivestate;

	@Temporal(TemporalType.DATE)
	@Column(name="REPAIRORDER_RECEIVETIME")
	private Date repairorderReceivetime;

	@Column(name="REPAIRORDER_REMARKS")
	private String repairorderRemarks;

	@Column(name="REPAIRORDER_SCHEDULE")
	private String repairorderSchedule;

	@Column(name="REPAIRORDER_STATE")
	private BigDecimal repairorderState;

	@Column(name="REPAIRORDER_TELL")
	private String repairorderTell;

	@Column(name="REPAIRORDER_TYPE")
	private BigDecimal repairorderType;

	//bi-directional many-to-one association to Confirm
	@OneToOne(mappedBy="repairorder")
	private Confirm confirm;

	//bi-directional many-to-one association to Detection
	@OneToOne(mappedBy="repairorder")
	private Detection detection;

	//bi-directional many-to-one association to Diystatus
	@OneToOne(mappedBy="repairorder")
	private Diystatus diystatus;
	
	//bi-directional many-to-one association to Process
	@OneToOne(mappedBy="repairorder")
	private Process process;

	//bi-directional many-to-one association to DELIVERRECORD_copy
	@OneToOne(mappedBy="repairorder")
	private DELIVERRECORD_copy DELIVERRECORD_copy;
	
	//bi-directional many-to-one association to Notelist
	@OneToMany(mappedBy="repairorder")
	@JSONField(serialize=false)
	private List<Notelist> notelists;
	
	//bi-directional many-to-one association to PAYRECORD_copy
	@OneToMany(mappedBy="repairorder")
	@JSONField(serialize=false)
	private List<PAYRECORD_copy> PAYRECORD_copys;

	//bi-directional many-to-one association to BILLRECORD_copy
	@OneToMany(mappedBy="repairorder")
	@JSONField(serialize=false)
	private List<BILLRECORD_copy> BILLRECORD_copys;

	//bi-directional many-to-one association to Customer
	@ManyToOne
	@JoinColumn(name="CUSNO")
	private Customer customer;

	//bi-directional many-to-one association to Product
	@ManyToOne
	@JoinColumn(name="ID")
	private Product product;


	//客户id
	@Transient
	private Long cusno;
	//产品id
	@Transient
	private Long productId;
	
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String idRange;

	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String alreadymoneyRange;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String crucesRange;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String faultdescriptionRange;
	@Transient
	private String moneyRange;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String numberRange;
	@Transient
	private String timeRange;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String remarksRange;
	
	//高级查询中分类的集合
	@Transient
	private List<Object> repairorderClassifyList;

	//高级查询中维修工单进度的集合
	@Transient
	private List<Object> repairorderScheduleList;
	
	@Transient
	private List<Object> repairorderDateStartAndStop;
	//高级查询中接件日期开始日期
	@Transient
	private Date repairorderReceivedateStart;
	//高级查询中接件日期结束日期
	@Transient
	private Date repairorderReceivedateStop;
	//高级查询中约定交付日期开始日期
	@Transient
	private Date repairorderArrangedateStart;
	//高级查询中约定交付日期结束日期
	@Transient
	private Date repairorderArrangedateStop;
	
	public List<Object> getRepairorderDateStartAndStop() {
		return repairorderDateStartAndStop;
	}

	public void setRepairorderDateStartAndStop(List<Object> repairorderDateStartAndStop) {
		this.repairorderDateStartAndStop = repairorderDateStartAndStop;
	}

	public Long getCusno() {
		return cusno;
	}

	public void setCusno(Long cusno) {
		this.cusno = cusno;
	}

	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public String getIdRange() {
		return idRange;
	}

	public void setIdRange(String idRange) {
		this.idRange = idRange;
	}

	public String getAlreadymoneyRange() {
		return alreadymoneyRange;
	}

	public void setAlreadymoneyRange(String alreadymoneyRange) {
		this.alreadymoneyRange = alreadymoneyRange;
	}

	public String getCrucesRange() {
		return crucesRange;
	}

	public void setCrucesRange(String crucesRange) {
		this.crucesRange = crucesRange;
	}

	public String getFaultdescriptionRange() {
		return faultdescriptionRange;
	}

	public void setFaultdescriptionRange(String faultdescriptionRange) {
		this.faultdescriptionRange = faultdescriptionRange;
	}

	public String getMoneyRange() {
		return moneyRange;
	}

	public void setMoneyRange(String moneyRange) {
		this.moneyRange = moneyRange;
	}

	public String getNumberRange() {
		return numberRange;
	}

	public void setNumberRange(String numberRange) {
		this.numberRange = numberRange;
	}

	public String getTimeRange() {
		return timeRange;
	}

	public void setTimeRange(String timeRange) {
		this.timeRange = timeRange;
	}

	public String getRemarksRange() {
		return remarksRange;
	}

	public void setRemarksRange(String remarksRange) {
		this.remarksRange = remarksRange;
	}

	public List<Object> getRepairorderClassifyList() {
		return repairorderClassifyList;
	}

	public void setRepairorderClassifyList(List<Object> repairorderClassifyList) {
		this.repairorderClassifyList = repairorderClassifyList;
	}

	public List<Object> getRepairorderScheduleList() {
		return repairorderScheduleList;
	}

	public void setRepairorderScheduleList(List<Object> repairorderScheduleList) {
		this.repairorderScheduleList = repairorderScheduleList;
	}

	public Date getRepairorderReceivedateStart() {
		return repairorderReceivedateStart;
	}

	public void setRepairorderReceivedateStart(Date repairorderReceivedateStart) {
		this.repairorderReceivedateStart = repairorderReceivedateStart;
	}

	public Date getRepairorderReceivedateStop() {
		return repairorderReceivedateStop;
	}

	public void setRepairorderReceivedateStop(Date repairorderReceivedateStop) {
		this.repairorderReceivedateStop = repairorderReceivedateStop;
	}

	public Date getRepairorderArrangedateStart() {
		return repairorderArrangedateStart;
	}

	public void setRepairorderArrangedateStart(Date repairorderArrangedateStart) {
		this.repairorderArrangedateStart = repairorderArrangedateStart;
	}

	public Date getRepairorderArrangedateStop() {
		return repairorderArrangedateStop;
	}

	public void setRepairorderArrangedateStop(Date repairorderArrangedateStop) {
		this.repairorderArrangedateStop = repairorderArrangedateStop;
	}

	public Repairorder() {
	}

	public long getRepairorderId() {
		return this.repairorderId;
	}

	public void setRepairorderId(long repairorderId) {
		this.repairorderId = repairorderId;
	}

	public BigDecimal getRepairorderAlreadymoney() {
		return this.repairorderAlreadymoney;
	}

	public void setRepairorderAlreadymoney(BigDecimal repairorderAlreadymoney) {
		this.repairorderAlreadymoney = repairorderAlreadymoney;
	}

	public Date getRepairorderArrangedate() {
		return this.repairorderArrangedate;
	}

	public void setRepairorderArrangedate(Date repairorderArrangedate) {
		this.repairorderArrangedate = repairorderArrangedate;
	}

	public String getRepairorderClassify() {
		return this.repairorderClassify;
	}

	public void setRepairorderClassify(String repairorderClassify) {
		this.repairorderClassify = repairorderClassify;
	}

	public String getRepairorderContacts() {
		return this.repairorderContacts;
	}

	public void setRepairorderContacts(String repairorderContacts) {
		this.repairorderContacts = repairorderContacts;
	}

	public String getRepairorderCruces() {
		return this.repairorderCruces;
	}

	public void setRepairorderCruces(String repairorderCruces) {
		this.repairorderCruces = repairorderCruces;
	}

	public String getRepairorderFaultdescription() {
		return this.repairorderFaultdescription;
	}

	public void setRepairorderFaultdescription(String repairorderFaultdescription) {
		this.repairorderFaultdescription = repairorderFaultdescription;
	}

	public BigDecimal getRepairorderGrossprofit() {
		return this.repairorderGrossprofit;
	}

	public void setRepairorderGrossprofit(BigDecimal repairorderGrossprofit) {
		this.repairorderGrossprofit = repairorderGrossprofit;
	}

	public BigDecimal getRepairorderIfdelete() {
		return this.repairorderIfdelete;
	}

	public void setRepairorderIfdelete(BigDecimal repairorderIfdelete) {
		this.repairorderIfdelete = repairorderIfdelete;
	}

	public Date getRepairorderIntodate() {
		return this.repairorderIntodate;
	}

	public void setRepairorderIntodate(Date repairorderIntodate) {
		this.repairorderIntodate = repairorderIntodate;
	}

	public BigDecimal getRepairorderMoney() {
		return this.repairorderMoney;
	}

	public void setRepairorderMoney(BigDecimal repairorderMoney) {
		this.repairorderMoney = repairorderMoney;
	}

	public String getRepairorderName() {
		return this.repairorderName;
	}

	public void setRepairorderName(String repairorderName) {
		this.repairorderName = repairorderName;
	}

	public String getRepairorderNumber() {
		return this.repairorderNumber;
	}

	public void setRepairorderNumber(String repairorderNumber) {
		this.repairorderNumber = repairorderNumber;
	}

	public String getRepairorderPhone() {
		return this.repairorderPhone;
	}

	public void setRepairorderPhone(String repairorderPhone) {
		this.repairorderPhone = repairorderPhone;
	}

	public Date getRepairorderReceivedate() {
		return this.repairorderReceivedate;
	}

	public void setRepairorderReceivedate(Date repairorderReceivedate) {
		this.repairorderReceivedate = repairorderReceivedate;
	}

	public String getRepairorderReceiveman() {
		return this.repairorderReceiveman;
	}

	public void setRepairorderReceiveman(String repairorderReceiveman) {
		this.repairorderReceiveman = repairorderReceiveman;
	}

	public String getRepairorderReceivestate() {
		return this.repairorderReceivestate;
	}

	public void setRepairorderReceivestate(String repairorderReceivestate) {
		this.repairorderReceivestate = repairorderReceivestate;
	}

	public Date getRepairorderReceivetime() {
		return this.repairorderReceivetime;
	}

	public void setRepairorderReceivetime(Date repairorderReceivetime) {
		this.repairorderReceivetime = repairorderReceivetime;
	}

	public String getRepairorderRemarks() {
		return this.repairorderRemarks;
	}

	public void setRepairorderRemarks(String repairorderRemarks) {
		this.repairorderRemarks = repairorderRemarks;
	}

	public String getRepairorderSchedule() {
		return this.repairorderSchedule;
	}

	public void setRepairorderSchedule(String repairorderSchedule) {
		this.repairorderSchedule = repairorderSchedule;
	}

	public BigDecimal getRepairorderState() {
		return this.repairorderState;
	}

	public void setRepairorderState(BigDecimal repairorderState) {
		this.repairorderState = repairorderState;
	}

	public String getRepairorderTell() {
		return this.repairorderTell;
	}

	public void setRepairorderTell(String repairorderTell) {
		this.repairorderTell = repairorderTell;
	}

	public BigDecimal getRepairorderType() {
		return this.repairorderType;
	}

	public void setRepairorderType(BigDecimal repairorderType) {
		this.repairorderType = repairorderType;
	}

	public List<Notelist> getNotelists() {
		return this.notelists;
	}

	public void setNotelists(List<Notelist> notelists) {
		this.notelists = notelists;
	}

	public Notelist addNotelist(Notelist notelist) {
		getNotelists().add(notelist);
		notelist.setRepairorder(this);

		return notelist;
	}

	public Notelist removeNotelist(Notelist notelist) {
		getNotelists().remove(notelist);
		notelist.setRepairorder(null);

		return notelist;
	}

	public Confirm getConfirm() {
		return this.confirm;
	}

	public void setConfirm(Confirm confirm) {
		this.confirm = confirm;
	}

	public Customer getCustomer() {
		return this.customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public Detection getDetection() {
		return this.detection;
	}

	public void setDetection(Detection detection) {
		this.detection = detection;
	}

	public Diystatus getDiystatus() {
		return this.diystatus;
	}

	public void setDiystatus(Diystatus diystatus) {
		this.diystatus = diystatus;
	}

	public Product getProduct() {
		return this.product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public Process getProcess() {
		return process;
	}

	public void setProcess(Process process) {
		this.process = process;
	}

	public List<PAYRECORD_copy> getPAYRECORD_copys() {
		return PAYRECORD_copys;
	}

	public void setPAYRECORD_copys(List<PAYRECORD_copy> pAYRECORD_copys) {
		PAYRECORD_copys = pAYRECORD_copys;
	}

	public PAYRECORD_copy addPAYRECORD_copy(PAYRECORD_copy pAYRECORD_copy) {
		getPAYRECORD_copys().add(pAYRECORD_copy);
		pAYRECORD_copy.setRepairorder(this);

		return pAYRECORD_copy;
	}

	public PAYRECORD_copy removePAYRECORD_copy(PAYRECORD_copy pAYRECORD_copy) {
		getPAYRECORD_copys().remove(pAYRECORD_copy);
		pAYRECORD_copy.setRepairorder(null);

		return pAYRECORD_copy;
	}

	public List<BILLRECORD_copy> getBILLRECORD_copys() {
		return BILLRECORD_copys;
	}

	public void setBILLRECORD_copys(List<BILLRECORD_copy> bILLRECORD_copys) {
		BILLRECORD_copys = bILLRECORD_copys;
	}
	
	public BILLRECORD_copy addBILLRECORD_copy(BILLRECORD_copy bILLRECORD_copy) {
		getBILLRECORD_copys().add(bILLRECORD_copy);
		bILLRECORD_copy.setRepairorder(this);

		return bILLRECORD_copy;
	}

	public BILLRECORD_copy removeBILLRECORD_copy(BILLRECORD_copy bILLRECORD_copy) {
		getBILLRECORD_copys().remove(bILLRECORD_copy);
		bILLRECORD_copy.setRepairorder(null);

		return bILLRECORD_copy;
	}

	public DELIVERRECORD_copy getDELIVERRECORD_copy() {
		return DELIVERRECORD_copy;
	}

	public void setDELIVERRECORD_copy(DELIVERRECORD_copy dELIVERRECORD_copy) {
		DELIVERRECORD_copy = dELIVERRECORD_copy;
	}
	
}